<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>JVM中的线程与并发管理</title>
    <link href="https://cdn.staticfile.org/font-awesome/6.4.0/css/all.min.css" rel="stylesheet">
    <link href="https://cdn.staticfile.org/tailwindcss/2.2.19/tailwind.min.css" rel="stylesheet">
    <link href="https://fonts.googleapis.com/css2?family=Noto+Serif+SC:wght@400;500;600;700&family=Noto+Sans+SC:wght@300;400;500;700&display=swap" rel="stylesheet">
    <style>
        body {
            font-family: 'Noto Sans SC', Tahoma, Arial, Roboto, "Droid Sans", "Helvetica Neue", "Droid Sans Fallback", "Heiti SC", "Hiragino Sans GB", Simsun, sans-serif;
            background: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%);
            min-height: 100vh;
            position: relative;
            overflow-x: hidden;
        }
        
        /* 背景装饰 */
        body::before {
            content: '';
            position: fixed;
            top: 0;
            left: 0;
            right: 0;
            bottom: 0;
            background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1440 320"><path fill="%23ffffff" fill-opacity="0.03" d="M0,96L48,112C96,128,192,160,288,160C384,160,480,128,576,122.7C672,117,768,139,864,154.7C960,171,1056,181,1152,165.3C1248,149,1344,107,1392,85.3L1440,64L1440,320L1392,320C1344,320,1248,320,1152,320C1056,320,960,320,864,320C768,320,672,320,576,320C480,320,384,320,288,320C192,320,96,320,48,320L0,320Z"></path></svg>') no-repeat;
            background-size: cover;
            z-index: -1;
        }
        
        /* Hero 区域 */
        .hero {
            background: linear-gradient(135deg, rgba(30,60,114,0.95) 0%, rgba(42,82,152,0.95) 100%);
            position: relative;
            overflow: hidden;
        }
        
        .hero::after {
            content: '';
            position: absolute;
            bottom: -2px;
            left: 0;
            right: 0;
            height: 100px;
            background: white;
            clip-path: polygon(0 50%, 100% 0, 100% 100%, 0 100%);
        }
        
        /* 标题样式 */
        h1 {
            font-family: 'Noto Serif SC', serif;
            font-weight: 700;
            background: linear-gradient(135deg, #ffffff 0%, #e0e0e0 100%);
            -webkit-background-clip: text;
            -webkit-text-fill-color: transparent;
            text-shadow: 0 2px 10px rgba(0,0,0,0.1);
        }
        
        h3 {
            font-family: 'Noto Serif SC', serif;
            font-weight: 600;
            color: #1e3c72;
            position: relative;
            padding-left: 20px;
        }
        
        h3::before {
            content: '';
            position: absolute;
            left: 0;
            top: 50%;
            transform: translateY(-50%);
            width: 4px;
            height: 24px;
            background: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%);
            border-radius: 2px;
        }
        
        h4 {
            font-family: 'Noto Sans SC', sans-serif;
            font-weight: 500;
            color: #2a5298;
        }
        
        h5 {
            font-family: 'Noto Sans SC', sans-serif;
            font-weight: 500;
            color: #3a5a98;
        }
        
        /* 内容卡片 */
        .content-card {
            background: white;
            border-radius: 16px;
            box-shadow: 0 10px 30px rgba(0,0,0,0.1);
            padding: 40px;
            margin-bottom: 30px;
            transition: transform 0.3s ease, box-shadow 0.3s ease;
        }
        
        .content-card:hover {
            transform: translateY(-5px);
            box-shadow: 0 15px 40px rgba(0,0,0,0.15);
        }
        
        /* 代码块样式 */
        pre {
            background: #f8f9fa;
            border: 1px solid #e9ecef;
            border-radius: 8px;
            padding: 20px;
            overflow-x: auto;
            font-size: 14px;
            line-height: 1.6;
            position: relative;
        }
        
        pre::before {
            content: 'Java';
            position: absolute;
            top: 10px;
            right: 10px;
            background: #2a5298;
            color: white;
            padding: 2px 10px;
            border-radius: 4px;
            font-size: 12px;
            font-weight: 500;
        }
        
        code {
            font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
            color: #2a5298;
            background: #f0f4f8;
            padding: 2px 6px;
            border-radius: 4px;
            font-size: 0.9em;
        }
        
        pre code {
            background: none;
            padding: 0;
            color: #333;
        }
        
        /* 列表样式 */
        ul {
            list-style: none;
            padding-left: 0;
        }
        
        ul li {
            position: relative;
            padding-left: 30px;
            margin-bottom: 12px;
            line-height: 1.8;
        }
        
        ul li::before {
            content: '\f054';
            font-family: 'Font Awesome 6 Free';
            font-weight: 900;
            position: absolute;
            left: 0;
            top: 3px;
            color: #2a5298;
            font-size: 12px;
        }
        
        /* 图片样式 */
        img {
            border-radius: 12px;
            box-shadow: 0 8px 24px rgba(0,0,0,0.1);
            margin: 30px auto;
            display: block;
            max-width: 100%;
            height: auto;
        }
        
        /* 段落样式 */
        p {
            line-height: 1.8;
            color: #4a5568;
            margin-bottom: 20px;
        }
        
        /* 强调文本 */
        strong {
            color: #1e3c72;
            font-weight: 600;
        }
        
        /* 导航指示器 */
        .nav-indicator {
            position: fixed;
            right: 30px;
            top: 50%;
            transform: translateY(-50%);
            z-index: 100;
        }
        
        .nav-dot {
            width: 12px;
            height: 12px;
            border-radius: 50%;
            background: rgba(255,255,255,0.3);
            margin: 15px 0;
            cursor: pointer;
            transition: all 0.3s ease;
        }
        
        .nav-dot.active {
            background: white;
            transform: scale(1.5);
        }
        
        /* 特色引用块 */
        .feature-quote {
            background: linear-gradient(135deg, #f0f4f8 0%, #e8eef5 100%);
            border-left: 4px solid #2a5298;
            padding: 20px 30px;
            margin: 30px 0;
            border-radius: 8px;
            font-style: italic;
            color: #2c5282;
        }
        
        /* 数据可视化容器 */
        .mermaid-container {
            background: #f8f9fa;
            border-radius: 12px;
            padding: 30px;
            margin: 30px 0;
            box-shadow: 0 5px 20px rgba(0,0,0,0.05);
        }
        
        /* 响应式设计 */
        @media (max-width: 768px) {
            .content-card {
                padding: 25px;
            }
            
            h1 {
                font-size: 2rem;
            }
            
            .nav-indicator {
                display: none;
            }
        }
        
        /* 动画效果 */
        @keyframes fadeInUp {
            from {
                opacity: 0;
                transform: translateY(30px);
            }
            to {
                opacity: 1;
                transform: translateY(0);
            }
        }
        
        .fade-in {
            animation: fadeInUp 0.8s ease-out;
        }
        
        /* 首字下沉 */
        .first-letter::first-letter {
            float: left;
            font-size: 4em;
            line-height: 0.8;
            margin: 0.1em 0.1em 0 0;
            font-family: 'Noto Serif SC', serif;
            font-weight: 700;
            color: #1e3c72;
        }
    </style>
</head>
<body>
    <!-- Hero 区域 -->
    <section class="hero py-20 px-6">
        <div class="max-w-6xl mx-auto text-center">
            <div class="mb-6">
                <i class="fas fa-microchip text-6xl text-white opacity-80"></i>
            </div>
            <h1 class="text-5xl md:text-6xl mb-6 fade-in">JVM中的线程与并发管理</h1>
            <p class="text-xl text-gray-200 max-w-3xl mx-auto leading-relaxed fade-in" style="animation-delay: 0.2s;">
                深入探索Java虚拟机的并发世界，掌握高性能应用开发的核心技术
            </p>
            <div class="mt-10 flex justify-center space-x-6 fade-in" style="animation-delay: 0.4s;">
                <div class="text-center">
                    <i class="fas fa-threads text-3xl text-white mb-2"></i>
                    <p class="text-gray-200">线程管理</p>
                </div>
                <div class="text-center">
                    <i class="fas fa-sync text-3xl text-white mb-2"></i>
                    <p class="text-gray-200">同步机制</p>
                </div>
                <div class="text-center">
                    <i class="fas fa-shield-alt text-3xl text-white mb-2"></i>
                    <p class="text-gray-200">并发安全</p>
                </div>
            </div>
        </div>
    </section>

    <!-- 导航指示器 -->
    <div class="nav-indicator">
        <div class="nav-dot active"></div>
        <div class="nav-dot"></div>
        <div class="nav-dot"></div>
        <div class="nav-dot"></div>
        <div class="nav-dot"></div>
        <div class="nav-dot"></div>
    </div>

    <!-- 主要内容 -->
    <main class="max-w-6xl mx-auto px-6 py-12">
        <!-- 引言 -->
        <div class="content-card fade-in">
            <p class="text-lg leading-relaxed first-letter">
                无论是在单机应用，还是在分布式系统中，如何高效、安全地管理线程与并发，都是我们开发高性能Java应用的关键。理解JVM如何管理和调度线程，不仅能够帮助我们写出更加高效的代码，还能有效地避免在并发编程中常见的各种问题，如死锁、竞态条件和资源竞争等。
            </p>
            
            <div class="mermaid-container">
                <div class="mermaid">
                    graph TB
                        A[JVM线程管理] --> B[线程模型]
                        A --> C[线程调度]
                        A --> D[同步机制]
                        A --> E[线程池]
                        B --> B1[生命周期]
                        B --> B2[线程状态]
                        C --> C1[调度策略]
                        C --> C2[优先级]
                        D --> D1[synchronized]
                        D --> D2[Lock接口]
                        D --> D3[volatile]
                        E --> E1[核心参数]
                        E --> E2[任务队列]
                        
                        style A fill:#1e3c72,stroke:#fff,stroke-width:3px,color:#fff
                        style B fill:#2a5298,stroke:#fff,stroke-width:2px,color:#fff
                        style C fill:#2a5298,stroke:#fff,stroke-width:2px,color:#fff
                        style D fill:#2a5298,stroke:#fff,stroke-width:2px,color:#fff
                        style E fill:#2a5298,stroke:#fff,stroke-width:2px,color:#fff
                </div>
            </div>
            
            <p class="text-lg leading-relaxed mt-6">
                JVM作为Java程序的运行时环境，在处理多线程时，提供了非常强大的支持。它不仅负责线程的创建、调度与销毁，还承担着线程同步、内存共享、以及线程间通信等多方面的工作。我们将从JVM的线程模型谈起，了解JVM如何创建与调度线程，如何保证线程之间的数据一致性与内存可见性，及其如何通过锁和并发工具保证程序的线程安全。
            </p>
        </div>

        <!-- JVM中的线程基础 -->
        <div class="content-card fade-in">
            <h3 class="text-2xl mb-6"><i class="fas fa-layer-group mr-3"></i>JVM中的线程基础</h3>
            
            <p class="mb-6">JVM中的线程基础涵盖了Java虚拟机如何创建、管理和调度线程，如何实现线程间的并